<!--
//******************************************************************
//* Copyright (c) 2008 Ford Motor Company. All Rights Reserved.
//*
//*
//* $$Workfile:   subCostStructureDetail.jsp  $$
//* $$Revision:   1.0  $$
//* $$Author:   JLOPE262  $$
//* $$Date:   Nov 14 2008 08:57:48  $$
//*
//* Description: Description of file goes here
//******************************************************************
-->
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display-el" %>
<%@ taglib uri="ford-arg/tags" prefix="ft" %>

<script language="JavaScript" src="./scripts/popups.js"></script>
<script language="JavaScript" src="./scripts/ajaxSearch.js"></script>

<script language="javascript">		
	
	function lookupSupplier() {
		searchNameSupplier("lookupedSupplier", "supplierCode", "supplierClass");
	}
	
	function lookupPart() {
		searchNamePart("lookupedPart", "partClass", "partPrefix", "partBase", "partSuffix");
	}
	
	function volver() {
		document.SubCostStructureDetailForm.action = "SubCostStructureDetailActionBack.do";
		document.SubCostStructureDetailForm.section.value = "back";				
		document.SubCostStructureDetailForm.submit();
	}
	
	function siguiente() {
		document.SubCostStructureDetailForm.action = "SubCostStructureDetailActionSave.do";
		document.SubCostStructureDetailForm.section.value = "save";
		document.SubCostStructureDetailForm.submit();
	}	

</script>

<table>
	<tr>
		<td><h2><bean:message key="subCostStructure.detail.label.title"/></h2></td>
	</tr>
</table>
<br/>
<html:form action="/SubCostStructureDetailActionInit">
<html:hidden property="section" />
	<table>
		<tr>
			<td  class="text_blue_bold align_left"  colspan="100%">
				<bean:message key="subCostStructure.detail.label.id" />: <bean:write name="SubCostStructureDetailForm" property="subCostStrId" />
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="subCostStructure.detail.label.tier" />
			</td>
			<td class="text_blue_bold align_left">
				<bean:write name="SubCostStructureDetailForm" property="tier" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<bean:write name="SubCostStructureDetailForm" property="tierPath" />
			</td>
		</tr>
		<tr>
			<td style="height:15px;" />
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="subCostStructure.detail.label.description" />
			</td>
			<td class="align_left">
				<html:text property="description" maxlength="50" size="50" />
			</td>
		</tr>			
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="subCostStructure.detail.label.supplier" />
			</td>
			<td class="text_blue_bold align_left">
				<html:select property="supplierTypeSel" styleId="supplierClass">
					<html:options collection="supplierTypesCol" property="value" labelProperty="label" />
				</html:select>
				&minus;
				<html:text property="supplierCode" maxlength="6" size="6" styleId="supplierCode" />
				<html:button property="lookupSupp" onclick="lookupSupplier();" styleClass="button">...</html:button>
				<html:button property="supplier" onclick="findSupplierPopup('supplierClass', 'supplierCode');" styleClass="button" style="width:25px;">?</html:button>
				<div style="display:inline;" id="lookupedSupplier" />
			</td>
		</tr>		
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="part.label" />
			</td>
			<td class="align_left">
			<div id="part">
				<html:select property="partClassSel" styleId="partClass">
					<html:options collection="partClassesCol" property="value" labelProperty="label" />
				</html:select>
				&minus;
				<html:text property="partPrefix" maxlength="10" size="10" styleId="partPrefix" />
				&nbsp;
				<html:text property="partBase" maxlength="10" size="10" styleId="partBase" />
				&nbsp;
				<html:text property="partSufix" maxlength="10" size="10" styleId="partSuffix" />
				<html:button property="part" onclick="lookupPart();" styleClass="button">...</html:button>
				<html:button property="part" onclick="findPartPopup('supplierClass', 'supplierCode', 'partClass', 'partPrefix', 'partBase', 'partSuffix');" styleClass="button" style="width:25px;">?</html:button>
				<div style="display:inline;" id="lookupedPart" />
			</div>
			</td>			
		</tr>
		<tr>
			<td style="height:100px;">
			</td>
		</tr>
	</table>
	<table>
		<tr>
			<td class="align_left">
				<table align="right" class="table1" style="width: 250px;">
					<tr>
						<td class="align_left">									
							<logic:notEmpty property="createdBy" name="SubCostStructureDetailForm">
								<bean:define id="createdBy" name="SubCostStructureDetailForm" property="createdBy" />
								<bean:define id="createdDate" name="SubCostStructureDetailForm" property="createdDate" />
								<bean:message key="text.createdBy" arg0="${createdBy}" arg1="${createdDate}" />
							</logic:notEmpty>
						</td>
					</tr>
					<tr>
						<td class="align_left">
							<logic:notEmpty property="lastModifiedBy" name="SubCostStructureDetailForm">
								<bean:define id="lastModifiedBy" name="SubCostStructureDetailForm" property="lastModifiedBy" />
								<bean:define id="lastModifiedDate" name="SubCostStructureDetailForm" property="lastModifiedDate" />										
								<bean:message key="text.lastModifiedBy" arg0="${lastModifiedBy}" arg1="${lastModifiedDate}" />											
							</logic:notEmpty>
						</td>
					</tr>
				</table>					
			</td>
			<td class="align_right">
				<html:button property="back" onclick="volver();" styleClass="button"><bean:message key="subCostStructure.label.detail.backToMainCostStructure" /></html:button>
				<html:button property="next" onclick="siguiente();" styleClass="button"><bean:message key="label.next" /></html:button>
			</td>
		</tr>
	</table>
</html:form>